Define a new scalar product (for compact groups the sum is an integral instead)
Define a new basis in the space equipped with the new scalar product. The new basis can be expressed in the old basis using the Gram–Schmidt ortogonalization. Then there is a basis transformation between these bases.
With this new scalar product, our representation is unitary and we can find a similarity transformation (the basis transformation) that brings into that's unitary for the old scalar product